package com.liu.service.impl;

import com.liu.entity.Reply;
import com.liu.mapper.ReplyMapper;
import com.liu.service.ReplyService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

/**
 * (Reply)表服务实现类
 *
 * @author makejava
 * @since 2023-02-24 19:07:10
 */
@Service("replyServiceImpl")
@Transactional
public class ReplyServiceImpl implements ReplyService {
    @Resource
    private ReplyMapper replyMapper;


    @Override
    public Reply queryById(Integer id) {
        return this.replyMapper.queryById(id);
    }

    @Override
    public List<Reply> findAll() {
        return this.replyMapper.findAll();
    }

    @Override
    public List<Reply> queryAllByLimit(Integer pageNum, Integer pageSize, String answer) {
        return this.replyMapper.queryAllByLimit(pageNum, pageSize, answer);
    }

    @Override
    public long count(String answer) {
        return this.replyMapper.count(answer);
    }

    @Override
    public int insert(Reply reply) {
        return this.replyMapper.insert(reply);
    }

    @Override
    public int insertBatch(List<Reply> entities) {
        return this.replyMapper.insertBatch(entities);
    }

    @Override
    public int update(Reply reply) {
        return this.replyMapper.update(reply);
    }

    @Override
    public int deleteById(Integer id) {
        return this.replyMapper.deleteById(id);
    }

    @Override
    public int deleteByIds(List<Integer> ids) {
        return this.replyMapper.deleteByIds(ids);
    }
}
